[id].vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. <template>
  2. <LayoutNavigation />
  3. <LayoutContainer>
  4. <v-row>
  5. <v-col cols="12">
  6. <CommonBanner :imageSrc="'/images/actu/pub.png'" imageAlt="'line'" />
  7. </v-col>
  8. </v-row>
  9. <div v-if="actu">
  10. <v-row class="custom-row">
  11. <v-col>
  12. <div class="d-flex align-items-center">
  13. <NuxtLink to="/actualites" style="text-decoration: none !important">
  14. <div class="carousel-button">
  15. <i class="fa-solid fa-arrow-left" />
  16. </div>
  17. </NuxtLink>
  18. <NuxtLink to="/actualites" class="ml-2 back-button mt-12">
  19. Retour aux actualités
  20. </NuxtLink>
  21. </div>
  22. </v-col>
  23. </v-row>
  24. <v-row class="custom-row">
  25. <v-col cols="6">
  26. <v-img>
  27. <img :src="getImageUrl(actu.attachment)" class="image-actu" />
  28. </v-img>
  29. </v-col>
  30. <v-col cols="6">
  31. <h4 class="title-actu">{{ actu.title }}</h4>
  32. </v-col>
  33. </v-row>
  34. <v-row class="custom-row">
  35. <p v-html="actu.bodyText" class="description-actu"></p>
  36. </v-row>
  37. <v-row class="d-flex justify-center align-center">
  38. <v-btn class="btn mb-12" text>
  39. <v-icon class="fas fa-info mr-2"></v-icon>En savoir plus
  40. </v-btn>
  41. </v-row>
  42. </div>
  43. <v-row class="d-flex justify-space-between custom-row">
  44. <p class="share ml-6">MOTS CLÉS</p>
  45. <div>
  46. <p class="share mr-6">PARTAGER</p>
  47. </div>
  48. </v-row>
  49. <v-row class="d-flex justify-space-between mb-8 custom-row">
  50. <p class="key-word mt-3 ml-6">ROCK CONCERT FESTIVAL</p>
  51. <div class="social-icons mr-6">
  52. <a href="https://facebook.com" target="_blank" class="social-icon">
  53. <i class="fa-brands fa-facebook"></i>
  54. </a>
  55. <a href="https://twitter.com" target="_blank" class="social-icon">
  56. <i class="fa-brands fa-twitter"></i>
  57. </a>
  58. <a href="https://messenger.com" target="_blank" class="social-icon">
  59. <i class="fa-brands fa-facebook-messenger"></i>
  60. </a>
  61. <a href="https://instagram.com" target="_blank" class="social-icon">
  62. <i class="fa-brands fa-instagram"></i>
  63. </a>
  64. <a href="https://linkedin.com" target="_blank" class="social-icon">
  65. <i class="fa-brands fa-linkedin"></i>
  66. </a>
  67. <a href="mailto:example@example.com" class="social-icon">
  68. <i class="fa-solid fa-envelope"></i>
  69. </a>
  70. </div>
  71. </v-row>
  72. <v-row class="container-green">
  73. <v-col cols="12">
  74. <div class="d-flex justify-center align-center">
  75. <div
  76. class="carousel-button"
  77. @click="goPrevious"
  78. style="border: 2px solid #fff !important"
  79. >
  80. <i class="fas fa-chevron-left" style="color: white" />
  81. </div>
  82. <div
  83. class="carousel-button"
  84. @click="goNext"
  85. style="border: 2px solid #fff !important"
  86. >
  87. <i class="fas fa-chevron-right" style="color: white" />
  88. </div>
  89. </div>
  90. <Carousel ref="carousel" :items-to-show="3" :items-to-scroll="2">
  91. <Slide
  92. v-for="(event, index) in events"
  93. :key="index"
  94. class="slide-card"
  95. >
  96. <div class="card">
  97. <img class="card-img-top" :src="event.img" alt="Card image cap" />
  98. <div class="card-body">
  99. <small class="card-rdv">{{ event.rdv }}</small>
  100. <h5 class="card-title">
  101. {{ event.title }}
  102. </h5>
  103. <p class="card-localisation">
  104. {{ event.localisation }}
  105. </p>
  106. </div>
  107. <div class="card-footer">
  108. <v-chip-group active-class="primary--text" column>
  109. <v-chip
  110. v-for="(tag, indexTag) in event.tags"
  111. :key="indexTag"
  112. class="ma-2 chip-custom"
  113. :color="tagColor(tag)"
  114. label
  115. >
  116. <span :class="tagTextColor(tag)">{{ tag }}</span>
  117. </v-chip>
  118. </v-chip-group>
  119. </div>
  120. </div>
  121. </Slide>
  122. </Carousel>
  123. </v-col>
  124. </v-row>
  125. </LayoutContainer>
  126. <LayoutFooterPrefooter />
  127. <LayoutFooter />
  128. </template>
  129. <script setup lang="ts">
  130. import { ref } from "vue";
  131. import { Carousel, Slide } from "vue3-carousel";
  132. import { useRoute } from "vue-router";
  133. import "vue3-carousel/dist/carousel.css";
  134. import { useMaestroRequestService } from "~/composables/useMaestroRequestService";
  135. const { apiRequestService } = useMaestroRequestService();
  136. const actu = ref(null);
  137. const route = useRoute();
  138. const newsId = route.params.id;
  139. const pending = ref(true);
  140. const config = useRuntimeConfig();
  141. onMounted(async () => {
  142. try {
  143. actu.value = await apiRequestService.get(
  144. `${config.public.apiBaseUrl}/api/news/${newsId}`
  145. );
  146. pending.value = false;
  147. } catch (error) {
  148. console.error("Erreur lors de la récupération de l'actualité", error);
  149. pending.value = false;
  150. }
  151. });
  152. const getImageUrl = (attachment: string) => {
  153. if (attachment) {
  154. return `${config.public.apiBaseUrl}/uploads/news/${attachment}`;
  155. }
  156. console.log("pas d'image");
  157. };
  158. const tagColor = (tag) => {
  159. switch (tag) {
  160. case "Payant":
  161. return "red";
  162. case "Gratuit":
  163. return "green";
  164. default:
  165. return "primary";
  166. }
  167. };
  168. const tagTextColor = (tag) => {
  169. switch (tag) {
  170. case "Payant":
  171. return "red--text";
  172. case "Gratuit":
  173. return "green--text";
  174. default:
  175. return "white--text";
  176. }
  177. };
  178. const events = ref([
  179. {
  180. rdv: "20h00",
  181. title: "LA NUIT DES RÊVES ",
  182. localisation: "FESTIVALDE musique - LONGCHAMP",
  183. date: "21/06/2023",
  184. img: "/images/agenda/agenda2.jpg",
  185. tags: ["Festival", "Musique", "Tout public", "Payant"],
  186. },
  187. {
  188. rdv: "20h00",
  189. title: "LE LAC DES CYGNES",
  190. localisation: "SPECTACLE DE DANSE - PARIS 1",
  191. date: "22/06/2023",
  192. img: "/images/agenda/agenda3.jpg",
  193. tags: ["Festival", "Musique", "Tout public", "Gratuit"],
  194. },
  195. {
  196. rdv: "20h00",
  197. title: "SOLIDAYS 2023 : 23 > 25 juin",
  198. localisation: "ORCHESTRE DE PARIS - PARIS 12",
  199. date: "23/06/2023",
  200. img: "/images/agenda/agenda4.jpg",
  201. tags: ["Festival", "Musique", "Tout public", "Payant"],
  202. },
  203. {
  204. rdv: "20h00",
  205. title: "LE LAC DES CYGNES",
  206. localisation: "FESTIVALDE musique - LONGCHAMP",
  207. date: "24/06/2023",
  208. img: "/images/agenda/agenda5.jpg",
  209. tags: ["Festival", "Musique", "Tout public", "Payant"],
  210. },
  211. {
  212. rdv: "20h00",
  213. title: "SOLIDAYS 2023 : 23 > 25 juin ",
  214. localisation: "SPECTACLE DE DANSE - PARIS 1",
  215. date: "20/06/2023",
  216. img: "/images/agenda/agenda1.jpg",
  217. tags: ["Festival", "Musique", "Tout public", "Payant"],
  218. },
  219. ]);
  220. let carousel;
  221. const goPrevious = () => carousel.prev();
  222. const goNext = () => carousel.next();
  223. </script>
  224. <style scoped>
  225. .custom-row {
  226. width: 90%;
  227. margin-left: auto;
  228. margin-right: auto;
  229. }
  230. :deep().text-left,
  231. :deep().text-right,
  232. :deep().description-square,
  233. :deep().black-square,
  234. :deep().blue-square {
  235. display: none;
  236. }
  237. :deep().text-right {
  238. display: none;
  239. }
  240. :deep().cover-image {
  241. transform: none;
  242. }
  243. .btn {
  244. background: var(--Vert-60, #64afb7);
  245. display: flex;
  246. left: 0;
  247. padding: 25px 28px;
  248. align-items: center;
  249. gap: 9px;
  250. color: var(--NEUTRAL---BLANC, #fff);
  251. font-family: Barlow;
  252. font-size: 0.9rem;
  253. border-radius: 5px;
  254. font-style: normal;
  255. font-weight: 700;
  256. line-height: 15px;
  257. letter-spacing: 1.3px;
  258. text-transform: uppercase;
  259. margin-bottom: -1rem;
  260. }
  261. .green--text {
  262. color: green;
  263. }
  264. .red--text {
  265. color: red;
  266. }
  267. .black--text {
  268. color: black;
  269. }
  270. .btn-news {
  271. color: #9edbdd;
  272. border-radius: 2rem;
  273. font-family: "Barlow";
  274. background: transparent;
  275. border: 1px solid #9edbdd;
  276. border-radius: 6px;
  277. font-style: normal;
  278. font-weight: 600;
  279. text-transform: uppercase;
  280. display: flex;
  281. flex-direction: row;
  282. align-items: center;
  283. padding: 25px;
  284. font-size: 10px;
  285. line-height: 15px;
  286. }
  287. .chip-detail {
  288. color: #000000;
  289. }
  290. .chip-custom {
  291. color: white;
  292. border: 1px solid white;
  293. border-radius: 3rem;
  294. text-transform: uppercase;
  295. font-family: "Barlow";
  296. font-style: normal;
  297. display: flex;
  298. align-items: center;
  299. text-align: center;
  300. }
  301. .card-localisation {
  302. letter-spacing: 0.18em;
  303. text-transform: uppercase;
  304. font-size: 10px;
  305. color: white;
  306. }
  307. .card {
  308. border-radius: 15px 15px 0 0;
  309. margin-bottom: 2rem;
  310. }
  311. .icon-title {
  312. color: #64afb7;
  313. margin-top: 4.5rem;
  314. }
  315. .container-title {
  316. display: flex;
  317. align-items: center;
  318. margin-left: 2rem;
  319. margin-top: 4.5rem;
  320. }
  321. .carousel-button i {
  322. color: #000000;
  323. }
  324. .card-text {
  325. font-family: "Barlow";
  326. font-style: normal;
  327. font-weight: 500;
  328. font-size: 16px;
  329. line-height: 18px;
  330. margin-bottom: 1rem;
  331. color: #fff !important;
  332. }
  333. .card-title {
  334. font-family: "Barlow";
  335. font-style: normal;
  336. font-weight: 500;
  337. font-size: 20px;
  338. line-height: 24px;
  339. display: flex;
  340. align-items: center;
  341. letter-spacing: 0.18em;
  342. text-transform: uppercase;
  343. color: #fff !important;
  344. }
  345. .card-date {
  346. font-size: 0.8em;
  347. color: #888;
  348. margin-left: 1rem;
  349. color: #fff !important;
  350. }
  351. .card-footer {
  352. display: flex;
  353. justify-content: space-between;
  354. align-items: center;
  355. }
  356. .card-body {
  357. text-align: left;
  358. margin-bottom: 1rem;
  359. margin-left: 1rem;
  360. font-family: "Barlow";
  361. font-style: normal;
  362. font-weight: 500;
  363. line-height: 24px;
  364. color: #fff !important;
  365. color: #112528;
  366. }
  367. .card-img-top {
  368. border-radius: 9px 9px 0 0;
  369. width: 100%;
  370. object-fit: 90%;
  371. object-position: center;
  372. width: 384px;
  373. height: 247.11px;
  374. }
  375. .title,
  376. .carousel-button,
  377. .btn-news {
  378. margin-top: 2rem;
  379. margin-bottom: 2rem;
  380. }
  381. .agenda-details {
  382. font-family: "Barlow";
  383. font-style: normal;
  384. font-weight: 300;
  385. font-size: 16px;
  386. line-height: 20px;
  387. margin-left: 2rem;
  388. color: #091d20;
  389. margin-bottom: 3rem;
  390. width: 15rem;
  391. }
  392. .title {
  393. font-family: "Barlow";
  394. font-style: normal;
  395. font-weight: 600;
  396. font-size: 42px;
  397. line-height: 42px;
  398. margin-left: 2rem;
  399. color: #071b1f;
  400. }
  401. .carousel-button {
  402. display: flex;
  403. justify-content: center;
  404. align-items: center;
  405. width: 60px;
  406. height: 60px;
  407. background-color: transparent;
  408. border: 2px solid #000000;
  409. cursor: pointer;
  410. margin-right: 1rem;
  411. }
  412. .container-green {
  413. background-color: #0e2d32;
  414. }
  415. .back-button {
  416. text-decoration: none;
  417. color: #000000;
  418. font-family: Barlow;
  419. font-size: 0.9rem;
  420. font-style: normal;
  421. font-weight: 700;
  422. line-height: 15px;
  423. letter-spacing: 1.8px;
  424. text-transform: uppercase;
  425. }
  426. .image-actu {
  427. width: 80%;
  428. margin-left: 3.5rem;
  429. margin-right: auto;
  430. }
  431. .title-actu {
  432. margin-top: 11rem;
  433. text-decoration: none;
  434. text-transform: uppercase;
  435. font-family: Barlow;
  436. font-size: 36px;
  437. font-style: normal;
  438. font-weight: 600;
  439. }
  440. .description-actu {
  441. color: #0e2d32;
  442. text-align: justify;
  443. font-family: "Barlow";
  444. font-size: 30px;
  445. font-style: normal;
  446. font-weight: 500;
  447. line-height: 34px;
  448. margin-left: 3.5rem;
  449. margin-right: 3.5rem;
  450. margin-bottom: 3rem;
  451. }
  452. .share {
  453. color: #000;
  454. font-family: Barlow;
  455. font-size: 26px;
  456. font-style: normal;
  457. font-weight: 400;
  458. line-height: 28px;
  459. }
  460. .social-icons {
  461. display: flex;
  462. gap: 10px;
  463. }
  464. .social-icon i {
  465. font-size: 1.9em;
  466. margin-left: 0.5rem;
  467. margin-top: 0.5rem;
  468. color: #0e2d32;
  469. }
  470. .key-word {
  471. color: #000;
  472. font-family: Barlow;
  473. font-size: 20px;
  474. font-style: normal;
  475. font-weight: 500;
  476. line-height: 24px;
  477. }
  478. .title-other {
  479. color: #fff;
  480. }
  481. </style>